package com.lesso.yjy.sunflower.pojo.dto;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.LocalTime;

@Data
public class AttendanceRuleDTO implements Serializable {
    private static final long seralizationUID = 20250705L;

    private Long id;

    @NotBlank(message = "考勤编码不能为空")
    private String ruleCode;

    @NotBlank(message = "考勤名称不能为空")
    private String ruleName;

    @NotNull(message = "上班时间不能为空")
    @JsonFormat(pattern = "HH:mm:ss")
    private LocalTime workStartTime;

    @NotNull(message = "下班时间不能为空")
    @JsonFormat(pattern = "HH:mm:ss")
    private LocalTime workEndTime;

    private Integer lateThreshold;

    private Integer earlyThreshold;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime testFormatTime;
}
